var ctx = "http://localhost:8080";

function post(url,params,callback){
	$.post(url,params, function(json){
		if(json.code == 401){
			document.location = ctx+"/lottery/login.html";
		}else{
			callback(json);
		}
	});
}
function get(url,params,callback){
	$.get(url,params, function(json){
		if(json.code == 401){
			document.location = ctx+"/lottery/login.html";
		}else{
			callback(json);
		}
	});
}
